package com.ylfstu.Poly_;

public class Poly01 {
    public static void main(String[] args) {

        Master tom = new Master("Tom");
        Dog bigYellow = new Dog("bigYellow~");
        Bone bone = new Bone("bone~");

        tom.feed(bigYellow, bone);

        Cat huaCat = new Cat("huaCat~");
        Fish yellowFish = new Fish("yellowFish~");

        tom.feed(huaCat, yellowFish);

        //添加，给小猪喂米饭
        Pig pig = new Pig("huaPig");
        Rice rice = new Rice("mifan");
        tom.feed(pig, rice);
    }
}
